Skip to content

Comments

Add more robust error handling to SwipeChart#5955

Open
j0ntz wants to merge 1 commit intodevelopfrom
jon/fix/chart-rate-limit
Open

Add more robust error handling to SwipeChart#5955
j0ntz wants to merge 1 commit intodevelopfrom
jon/fix/chart-rate-limit

Conversation

@j0ntz
Copy link
Contributor

@j0ntz j0ntz commented Feb 24, 2026

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

Context

The SwipeChart component fetches market data from CoinGecko API and has insufficient error handling for network failures and rate-limiting scenarios. When rate limits or HTTP errors occur, the error handling is ambiguous and can fail silently, making debugging difficult.

Changes

  • Added HTTP status validation: Check response.ok before parsing JSON to catch non-2xx status codes early
  • Improved JSON parsing: Added try-catch around JSON parsing with fallback to raw text for error messages
  • Better rate-limit handling: Explicit HTTP 429 detection before JSON parsing phase
  • Enhanced error messages: More descriptive error text for HTTP errors and JSON parsing failures
  • Restructured error handling: Wrapped the retry loop in a try-catch to ensure setIsFetching(false) is always called via finally block

These changes make the component more resilient to API failures and easier to debug when issues occur.

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea8c620be5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@j0ntz j0ntz force-pushed the jon/fix/chart-rate-limit branch from ea8c620 to 6fdde05 Compare February 24, 2026 01:05
@EdgeApp EdgeApp deleted a comment from Jon-edge Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants